import request from '@/utils/request'

export function listAdmin(query) {
  return request({
    url: '/user/list',
    method: 'post',
    data: query
  })
}

export function createAdmin(query) {
  return request({
    url: '/user/create',
    method: 'post',
    data: query
  })
}


export function updateStatusAdmin(query) {
  return request({
    url: '/user/updateStatus',
    method: 'post',
    data: query
  })
}

export function updateAdmin(query) {
  return request({
    url: '/user/update',
    method: 'post',
    data: query
  })
}

export function deleteAdmin(query) {
  return request({
    url: '/user/delete',
    method: 'post',
    data: query
  })
}

export function getRoleList(query) {
  return request({
    url: '/user/rolelist',
    method: 'post',
    data: query
  })
}


export function createRole(query) {
  return request({
    url: '/user/createRole',
    method: 'post',
    data: query
  })
}

export function updateRole(query) {
  return request({
    url: '/user/updateRole',
    method: 'post',
    data: query
  })
}

export function deleteRole(query) {
  return request({
    url: '/user/deleteRole',
    method: 'post',
    data: query
  })
}

export function getPermission(query) {
  return request({
    url: '/user/getPermission',
    method: 'post',
    data: query
  })
}

export function updatePermission(query) {
  return request({
    url: '/user/updatePermission',
    method: 'post',
    data: query
  })
}

